package com.ld.control.business.variable.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 变量实例表
 * </p>
 *
 * @author wangfeng
 * @since 2024-04-23
 */
@Data
@TableName("variable_example")
@Schema(description = "VariableExampleModel对象")
public class VariableExampleModel implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long variableId;

    @Schema(description = "任务实例id")
    private Long taskExampleId;

    @Schema(description = "子任务实例id")
    private Long subTaskExampleId;

    @Schema(description = "任务code")
    private String taskExampleCode;

    @Schema(description = "任务实例名称")
    private String taskExampleName;

    @Schema(description = "子任务实例名称")
    private String subTaskExampleName;

    @Schema(description = "变量名称")
    private String name;

    @Schema(description = "变量作用域：0全局变量，1任务变量，2子任务变量")
    private Integer scope;

    @Schema(description = "变量值类型：参考代码里面参数枚举")
    private String valueType;

    @Schema(description = "参数值")
    private String value;

    @Schema(description = "默认参数值")
    private String defaultValue;

    @Schema(description = "数组当前坐标")
    private Integer arrayIndex;

    @Schema(description = "数组自动偏移:0不支持，1支持")
    private Integer offsetFlag;

    @Schema(description = "创建人id")
    private Long createBy;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新人")
    private Long updateBy;

    @Schema(description = "更新时间")
    private Date updateTime;


    public static final String ID = "id";

    public static final String VARIABLE_ID = "variable_id";

    public static final String TASK_EXAMPLE_ID = "task_example_id";

    public static final String SUB_TASK_EXAMPLE_ID = "sub_task_example_id";

    public static final String TASK_EXAMPLE_CODE = "task_example_code";

    public static final String TASK_EXAMPLE_NAME = "task_example_name";

    public static final String TASK_SUB_EXAMPLE_NAME = "task_sub_example_name";

    public static final String NAME = "name";

    public static final String SCOPE = "scope";

    public static final String VALUE_TYPE = "value_type";

    public static final String VALUE = "value";

    public static final String DEFAULT_VALUE = "default_value";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

}
